﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTO
{
    /// <summary>
    /// ConfigDTO lưu các thông tin cấu hình của ứng dụng.
    /// </summary>
    public class ConfigDto
    {
        private String databaseName;
        private String dataSource;
        private String userName;
        private String password;

        public String DatabaseName

        {
            get { return databaseName; }
            set { databaseName = value; }
        }
    
        public String DataSource
        {
            get { return dataSource; }
            set { dataSource = value; }
        }

        public String UserName
        {
            get { return userName; }
            set { userName = value; }
        }
        
        public String Password
        {
            get { return password; }
            set { password = value; }
        }

        public static String ConfigFilePath = System.IO.Path.GetDirectoryName(
                     System.Reflection.Assembly.GetAssembly(typeof(ConfigDto)).CodeBase)
                    + "/config/config.xml";
                                             

        public static void SetConfigFilePath(String configFilePath)
        {
            ConfigFilePath = configFilePath;
        }
    }
}
